﻿using System.Collections.ObjectModel;

namespace WpfApp1
{
    public class NameList : ObservableCollection<PersonName>
    {
        public NameList()
        {
            for (var i = 0; i < 5; i++)
            {
                Add(new PersonName("Willa", "Cather"));
                Add(new PersonName("Isak", "Dinesen"));
                Add(new PersonName("Victor", "Hugo"));
                Add(new PersonName("Jules", "Verne"));
            }
        }
    }

    public class PersonName
    {
        public PersonName(string first, string last)
        {
            FirstName = first;
            LastName = last;
        }

        public string FirstName { get; set; }

        public string LastName { get; set; }
    }
}